package collection_250224;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

public class Callable1 {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        FutureTask<String> f1 = new FutureTask<>(()->{
            return "hello";
        });
        new Thread(f1).start();
        f1.get();
    }
}
